<?php if(Yii::app()->user->hasFlash('contact')): ?>
<div class="flash-success">
<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>
<?php endif; ?>
Yii::app()->user->setFlash('contact','Thank you for contacting us. We will respond to you as soon as possible.');